
package kaizen.nomweb;
/*
import java.io.PrintStream;

import java.util.Date;
import java.util.Hashtable;

import javax.activation.DataHandler;
import javax.activation.FileDataSource;

import javax.mail.*;
import javax.mail.internet.*;

public class SendMail
{

  public SendMail()
  {
  }

  public static void SendFile(String to, String from, String host, 
                              String filename, String subject, String msgText1)
  {
    java.util.Properties props = System.getProperties();
    props.put("mail.smtp.host", host);
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(false);
    boolean attach = true;
    if (filename.trim().length() == 0)
      attach = false;
    try
    {
      MimeMessage msg = new MimeMessage(session);
      msg.setFrom(new InternetAddress(from));
      InternetAddress address[] =
      { new InternetAddress(to) };
      msg.setRecipients(javax.mail.Message.RecipientType.TO, address);
      MimeBodyPart mbp1 = new MimeBodyPart();
      mbp1.setText(msgText1);
      MimeBodyPart mbp2 = new MimeBodyPart();
      if (attach)
      {
        FileDataSource fds = new FileDataSource(filename);
        mbp2.setDataHandler(new DataHandler(fds));
        mbp2.setFileName(fds.getName());
      }
      Multipart mp = new MimeMultipart();
      mp.addBodyPart(mbp1);
      if (attach)
        mp.addBodyPart(mbp2);
      msg.setContent(mp);
      msg.setSentDate(new Date());
      msg.setSubject(subject);
      Transport.send(msg);
      System.out.println("El archivo fue enviado con exito...");
    } catch (MessagingException mex)
    {
      mex.printStackTrace();
      Exception ex = null;
      if ((ex = mex.getNextException()) != null)
        ex.printStackTrace();
    }
  }

  public static void init()
  {
  }
}
*/